﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QrCodeWinForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                pictureBox1.Visible = false;
                qrCodeGraphicControl1.Text = "";
            }
            else if (textBox1.Text.Length > 256)
            {
                MessageBox.Show("抱歉，字符串过长,请重新键入。", "Error!");
            }
            else
            {
                qrCodeGraphicControl1.Text = textBox1.Text;
                pictureBox1.Visible = true;
            }
        }

        private void qrCodeGraphicControl1_Click(object sender, EventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {

        }
    }
}
